<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
 '
 ' Copyright 2007 Liu, Xiaokang <4341322@gmail.com>
 ' Blog <http://www.ioio.name/>
 ' 
 ' This file is part of JOS(Judge Online System).
 ' You can see this project at <http://code.google.com/p/judgeonline/>
 ' 
 ' JOS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as
 ' published by the Free Software Foundation; either revision 3 of the License, or (at your option) any later revision.
 ' 
 ' JOS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 ' 
 ' You should have received a copy of the GNU General Public License along with JOS. if not, see
 ' <http://www.gnu.org/licenses/>.
 '
%>
<%Option Explicit%>
<%
	Dim PageTitle
	PageTitle="Home"
%>
<!--#include file="Header.asp"-->
<div id="Main">
<div id="Home">
<img src="images/indexLogo.jpg" />
<table>
<caption>Notice</caption>
	<thead>
		<tr>
			<th class="datetime">Date</th>
			<th>Message</th>
		</tr>
	</thead>
  <%
  	    Dim Rs,Pr
		conn.Open connstr
		Set Pr = Server.CreateObject("ADODB.Recordset")
		Pr.Open "Select top 5 *,CONVERT(VARCHAR(10),StartTime,102) as start From [Boards] Where StartTime < '"& Now() &"' Order by Bid Desc",conn,1,3 
		
		  		
		if Pr.eof and Pr.Bof then
		%>
     <tr>
        <td colspan="2" style="text-align:center;">No new notice</td>
    </tr>
    <%end if
		Do While Not Pr.eof and Not Pr.Bof
   %>
	<tr>
		<th class="datetime"><%=Pr("Start")%></th>
        <td><a href="Boards.asp?#<%=Pr("Bid")%>"><%=Pr("Subject")%></a></td>
    </tr>
<!--end of tr-->
  	  <% 
	  Pr.movenext
	  Loop
	Pr.Close
	set Pr=nothing
	conn.Close 
   %>
</table>
</div>
</div>
<!--#include file="Footer.asp"-->
